library(tidyverse)
aha_pred %>%
select(auc) %>%
distinct() %>%
ggplot()+
geom_boxplot(aes(y= auc, x= "AHA"))+
geom_point(aes(y= auc, x= "AHA"), alpha = 0.5)+
labs(title = "AHA AUC range")+
theme_classic()
pomms_pred %>%
select(auc) %>%
distinct() %>%
ggplot()+
geom_boxplot(aes(y= auc, x= "POMMS"))+
geom_point(aes(y= auc, x= "POMMS"), alpha = 0.5)+
labs(title = "POMMS AUC range")+
theme_classic()
max = aha_pred$auc %>%
max()
aha_pred %>%
filter(auc == max) %>%
ggplot()+
geom_boxplot(aes(x= treatment, y= Case, colour = timepoint))+
geom_point(aes(x= treatment, y= Case, colour = timepoint), position=position_jitterdodge(), alpha = 0.2)+
labs(title ="AHA to CHOICE")+
theme_classic()
aha_pred %>%
filter(auc == 0.94) %>%
ggplot()+
geom_boxplot(aes(x= treatment, y= Control, colour = timepoint))+
geom_point(aes(x= treatment, y= Control, colour = timepoint), position=position_jitterdodge(), alpha = 0.2)+
labs(title ="AHA to CHOICE")+
theme_classic()
max = pomms_pred$auc %>%
max()
pomms_pred %>%
filter(auc == max) %>%
ggplot()+
geom_boxplot(aes(x= treatment, y= Case, colour = timepoint))+
geom_point(aes(x= treatment, y= Case, colour = timepoint), position=position_jitterdodge(), alpha = 0.2)+
labs(title ="POMMS to CHOICE")+
theme_classic()
pomms_pred %>%
filter(auc == 0.82) %>%
ggplot()+
geom_boxplot(aes(x= treatment, y= Control, colour = timepoint))+
geom_point(aes(x= treatment, y= Control, colour = timepoint), position=position_jitterdodge(), alpha = 0.2)+
labs(title ="POMMS to CHOICE")+
theme_classic()
#AUCs above 0.7
aha_pred %>%
filter(auc > 0.7) %>%
ggplot()+
geom_boxplot(aes(x= treatment, y= Case, colour = timepoint))+
geom_point(aes(x= treatment, y= Case, colour = timepoint), position=position_jitterdodge(), alpha = 0.2)+
labs(title ="AHA to CHOICE")+
theme_classic()
aha_pred %>%
filter(auc > 0.7) %>%
ggplot()+
geom_boxplot(aes(x= treatment, y= Control, colour = timepoint))+
geom_point(aes(x= treatment, y= Control, colour = timepoint), position=position_jitterdodge(), alpha = 0.2)+
labs(title ="AHA to CHOICE")+
theme_classic()
pomms_pred %>%
filter(auc > 0.7) %>%
ggplot()+
geom_boxplot(aes(x= treatment, y= Case, colour = timepoint))+
geom_point(aes(x= treatment, y= Case, colour = timepoint), position=position_jitterdodge(), alpha = 0.2)+
labs(title ="POMMS to CHOICE")+
theme_classic()
pomms_pred %>%
filter(auc > 0.7) %>%
ggplot()+
geom_boxplot(aes(x= treatment, y= Control, colour = timepoint))+
geom_point(aes(x= treatment, y= Control, colour = timepoint), position=position_jitterdodge(), alpha = 0.2)+
labs(title ="POMMS to CHOICE")+
theme_classic()
max = aha_pred$auc %>%
max()
#colnames(aha_importance)
importance_summary = aha_importance %>%
filter(auc == max) %>%
pivot_longer(cols = c("ATCCTATTATTTTATTATTTTACGAAACTAAACAAAGGTTCAGCAAGCGAGAATAATAAAAAAAG":"CATAAACTGGTAGCGACCGGCACCACCGGTAAACTGATCGCAGAAGCTACCGGCT"), names_to = "food", values_to = "importance") %>%
group_by(label, food) %>%
summarise(mean_importance = mean(importance)) %>%
arrange(label, desc(mean_importance))
`summarise()` has grouped output by 'label'. You can override using the `.groups` argument.
ranking = importance_summary %>%
pull(food)
top10 = ranking[1:10]
plot_food_direction(top10, input, "treatment")
name_list = c()
for(item in top10){
name = common_names %>%
filter(str_detect(asv, item)) %>%
pull(common_name)
name_list = append(name_list, name)
}
name_list
[1] "cocoa bean"
[2] "avocado, NA, NA, NA, NA, NA"
[3] "NA, ceylon cinnamon, bay leaf, avocado, NA, NA"
[4] "goji berry, NA, goji berry, cutleaf groundcherry, tomatillo, nightshade, NA, blackberry nightshade, potato, NA"
[5] "garlic"
[6] "muscadine grape, common grape vine, NA, NA"
[7] "common grape vine"
[8] "common grape vine"
[9] "black chokeberry, apple, NA, crab apple, european pear, NA, afghan pear, nashi pear, siberian pear, hybrid chinese white pear"
[10] "NA, pecan"
[11] "sesame"
max = pomms_pred$auc %>%
max()
#colnames(pomms_importance)
importance_summary = pomms_importance %>%
filter(auc == max) %>%
pivot_longer(cols = c("ATCACGTTTTCCGAAAACAAACAAAGGTTCAGAAAGCGAAAATAAAAAAG":"ATCCTGTTTTCTCAAAACAAACAAAGGTTCAGAAAAAAAG"), names_to = "food", values_to = "importance") %>%
group_by(label, food) %>%
summarise(mean_importance = mean(importance)) %>%
arrange(label, desc(mean_importance))
`summarise()` has grouped output by 'label'. You can override using the `.groups` argument.
ranking = importance_summary %>%
pull(food)
top10 = ranking[1:10]
plot_food_direction(top10, input, "treatment")
name_list = c()
for(item in top10){
name = common_names %>%
filter(str_detect(asv, item)) %>%
pull(common_name)
name_list = append(name_list, name)
}
name_list
[1] "dandelion"
[2] "sunflower, jerusalem artichoke, sunchoke, dandelion"
[3] "ashanti pepper, long pepper, black pepper, wild betel"
[4] "canola, rapeseed"
[5] "brown mustard, canola, rapeseed, black mustard, cabbage, broccoli, cauliflower, kale, Brussels sprouts, collard greens, savoy, kohlrabi, gai lan, mustards, bok choy, canola, rapeseed, field mustard, napa cabbage, turnip, rocket, NA, white mustard"
[6] "oregano, NA, thyme"
[7] "sage"
[8] "sage"
[9] "NA, NA, rosemary"
[10] "lemon balm, rosemary"
[11] "sesame"
[12] NA
[13] NA
[14] "NA, NA"
[15] NA
[16] "rye, NA, NA, NA, NA, NA, bread wheat, NA, NA, NA, emmer wheat, spelt, einkorn, wild einkorn, spelt, NA, domesticated hulled wheat, NA, rivet wheat, durum wheat, wild einkorn, NA"
[17] "coconut"
[18] "fennel, dill, angelica, cumin, wild carrot, parsnip, parsley"
[19] "lettuce"
[20] "flaxseed"
[21] "tomato, NA"
#colnames(aha_importance)
importance_summary = aha_importance %>%
filter(auc >0.7) %>%
pivot_longer(cols = c("ATCCTATTATTTTATTATTTTACGAAACTAAACAAAGGTTCAGCAAGCGAGAATAATAAAAAAAG":"CATAAACTGGTAGCGACCGGCACCACCGGTAAACTGATCGCAGAAGCTACCGGCT"), names_to = "food", values_to = "importance") %>%
group_by(label, food) %>%
summarise(mean_importance = mean(importance)) %>%
arrange(label, desc(mean_importance))
`summarise()` has grouped output by 'label'. You can override using the `.groups` argument.
ranking = importance_summary %>%
pull(food)
top10 = ranking[1:10]
plot_food_direction(top10, input, "treatment")
name_list = c()
for(item in top10){
name = common_names %>%
filter(str_detect(asv, item)) %>%
pull(common_name)
name_list = append(name_list, name)
}
name_list
[1] "cocoa bean"
[2] "avocado, NA, NA, NA, NA, NA"
[3] "NA, ceylon cinnamon, bay leaf, avocado, NA, NA"
[4] "garlic"
[5] "goji berry, NA, goji berry, cutleaf groundcherry, tomatillo, nightshade, NA, blackberry nightshade, potato, NA"
[6] "muscadine grape, common grape vine, NA, NA"
[7] "common grape vine"
[8] "common grape vine"
[9] "sesame"
[10] "NA, pecan"
[11] "black chokeberry, apple, NA, crab apple, european pear, NA, afghan pear, nashi pear, siberian pear, hybrid chinese white pear"
importance_summary = pomms_importance %>%
filter(auc >0.7) %>%
pivot_longer(cols = c("ATCACGTTTTCCGAAAACAAACAAAGGTTCAGAAAGCGAAAATAAAAAAG":"ATCCTGTTTTCTCAAAACAAACAAAGGTTCAGAAAAAAAG"), names_to = "food", values_to = "importance") %>%
group_by(label, food) %>%
summarise(mean_importance = mean(importance)) %>%
arrange(label, desc(mean_importance))
`summarise()` has grouped output by 'label'. You can override using the `.groups` argument.
ranking = importance_summary %>%
pull(food)
top10 = ranking[1:10]
plot_food_direction(top10, input, "treatment")
name_list = c()
for(item in top10){
name = common_names %>%
filter(str_detect(asv, item)) %>%
pull(common_name)
name_list = append(name_list, name)
}
name_list
[1] "dandelion"
[2] "sunflower, jerusalem artichoke, sunchoke, dandelion"
[3] "tea"
[4] "ashanti pepper, long pepper, black pepper, wild betel"
[5] "canola, rapeseed"
[6] "brown mustard, canola, rapeseed, black mustard, cabbage, broccoli, cauliflower, kale, Brussels sprouts, collard greens, savoy, kohlrabi, gai lan, mustards, bok choy, canola, rapeseed, field mustard, napa cabbage, turnip, rocket, NA, white mustard"
[7] "rye, NA, NA, NA, NA, NA, bread wheat, NA, NA, NA, emmer wheat, spelt, einkorn, wild einkorn, spelt, NA, domesticated hulled wheat, NA, rivet wheat, durum wheat, wild einkorn, NA"
[8] "fennel, dill, angelica, cumin, wild carrot, parsnip, parsley"
[9] "goji berry, NA, goji berry, cutleaf groundcherry, tomatillo, nightshade, NA, blackberry nightshade, potato, NA"
[10] "coconut"
[11] "lettuce"
[12] "oat"